package com.ruoyi.domain;

import cn.hutool.core.date.DateUtil;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;
import lombok.Data;

/**
 * 骨密度检查
 * @TableName bone_check
 */
@TableName(value ="bone_check")
@Data
public class BoneCheck2 implements Serializable {
    /**
     * 
     */
    @TableId(type = IdType.AUTO)
    private Long id;

    /**
     * 序号
     */
    private String orderSn;

    /**
     * 用户姓名
     */
    private String name;

    /**
     * 性别
     */
    private String sex;

    /**
     * 生日
     */
    private Date birthday;

    /**
     * 年龄
     */
    private Integer age;

    /**
     * 身高
     */
    private Integer height;

    /**
     * 体重
     */
    private Integer weight;

    /**
     * BMI
     */
    private BigDecimal bmi;

    /**
     * T值
     */
    private BigDecimal t;

    /**
     * Z值
     */
    private BigDecimal z;

    /**
     * BMD
     */
    private BigDecimal bmd;

    /**
     * 创建时间
     */
    private Long time;

    /**
     * 日期
     */
    private Date date;

    /**
     * 身份证
     */
    private String idCard;

    /**
     * 骨峰值
     */
    private Integer bmdMax;

    /**
     * 骨密度年龄值
     */
    private Integer bmdAge;

    /**
     * 影像诊断
     */
    private String dcmDiagnosis;

    /**
     * 电话
     */
    private String tel;

    /**
     * 部位
     */
    private String position;

    /**
     * 侧别
     */
    private String side;

    /**
     * 送诊科室
     */
    private String referralDepartment;

    /**
     * 临床诊断
     */
    private String clinicalDiagnosis;

    /**
     * 送检医生
     */
    private String submittingDoctor;

    /**
     * 检查医生
     */
    private String inspectDoctor;

    /**
     * 审核医生
     */
    private String reviewDoctor;

    /**
     * 报告日期
     */
    private Date reportDate;

    /**
     * 医院
     */
    private String hospital;

    /**
     * 医院地址
     */
    private String hospitalAddr;

    /**
     * 用户地址
     */
    private String userAddr;

    /**
     * 建议
     */
    private String suggest;

    /**
     * 图像文件
     */
    private String imageFile;

    /**
     * 用户id
     */
    private Integer userId;

    /**
     * 种族
     */
    private String race;


    public void setBirthday(String birthByIdCard) {
        Date parse = DateUtil.parse(birthByIdCard);
        this.birthday = parse;
    }

    public String getBirthday() {

        return DateUtil.format(this.birthday, "yyyy-MM-dd");
    }

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        BoneCheck2 other = (BoneCheck2) that;
        return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
            && (this.getOrderSn() == null ? other.getOrderSn() == null : this.getOrderSn().equals(other.getOrderSn()))
            && (this.getName() == null ? other.getName() == null : this.getName().equals(other.getName()))
            && (this.getSex() == null ? other.getSex() == null : this.getSex().equals(other.getSex()))
            && (this.getBirthday() == null ? other.getBirthday() == null : this.getBirthday().equals(other.getBirthday()))
            && (this.getAge() == null ? other.getAge() == null : this.getAge().equals(other.getAge()))
            && (this.getHeight() == null ? other.getHeight() == null : this.getHeight().equals(other.getHeight()))
            && (this.getWeight() == null ? other.getWeight() == null : this.getWeight().equals(other.getWeight()))
            && (this.getBmi() == null ? other.getBmi() == null : this.getBmi().equals(other.getBmi()))
            && (this.getT() == null ? other.getT() == null : this.getT().equals(other.getT()))
            && (this.getZ() == null ? other.getZ() == null : this.getZ().equals(other.getZ()))
            && (this.getBmd() == null ? other.getBmd() == null : this.getBmd().equals(other.getBmd()))
            && (this.getTime() == null ? other.getTime() == null : this.getTime().equals(other.getTime()))
            && (this.getDate() == null ? other.getDate() == null : this.getDate().equals(other.getDate()))
            && (this.getIdCard() == null ? other.getIdCard() == null : this.getIdCard().equals(other.getIdCard()))
            && (this.getBmdMax() == null ? other.getBmdMax() == null : this.getBmdMax().equals(other.getBmdMax()))
            && (this.getBmdAge() == null ? other.getBmdAge() == null : this.getBmdAge().equals(other.getBmdAge()))
            && (this.getDcmDiagnosis() == null ? other.getDcmDiagnosis() == null : this.getDcmDiagnosis().equals(other.getDcmDiagnosis()))
            && (this.getTel() == null ? other.getTel() == null : this.getTel().equals(other.getTel()))
            && (this.getPosition() == null ? other.getPosition() == null : this.getPosition().equals(other.getPosition()))
            && (this.getSide() == null ? other.getSide() == null : this.getSide().equals(other.getSide()))
            && (this.getReferralDepartment() == null ? other.getReferralDepartment() == null : this.getReferralDepartment().equals(other.getReferralDepartment()))
            && (this.getClinicalDiagnosis() == null ? other.getClinicalDiagnosis() == null : this.getClinicalDiagnosis().equals(other.getClinicalDiagnosis()))
            && (this.getSubmittingDoctor() == null ? other.getSubmittingDoctor() == null : this.getSubmittingDoctor().equals(other.getSubmittingDoctor()))
            && (this.getInspectDoctor() == null ? other.getInspectDoctor() == null : this.getInspectDoctor().equals(other.getInspectDoctor()))
            && (this.getReviewDoctor() == null ? other.getReviewDoctor() == null : this.getReviewDoctor().equals(other.getReviewDoctor()))
            && (this.getReportDate() == null ? other.getReportDate() == null : this.getReportDate().equals(other.getReportDate()))
            && (this.getHospital() == null ? other.getHospital() == null : this.getHospital().equals(other.getHospital()))
            && (this.getHospitalAddr() == null ? other.getHospitalAddr() == null : this.getHospitalAddr().equals(other.getHospitalAddr()))
            && (this.getUserAddr() == null ? other.getUserAddr() == null : this.getUserAddr().equals(other.getUserAddr()))
            && (this.getSuggest() == null ? other.getSuggest() == null : this.getSuggest().equals(other.getSuggest()))
            && (this.getImageFile() == null ? other.getImageFile() == null : this.getImageFile().equals(other.getImageFile()))
            && (this.getUserId() == null ? other.getUserId() == null : this.getUserId().equals(other.getUserId()))
            && (this.getRace() == null ? other.getRace() == null : this.getRace().equals(other.getRace()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
        result = prime * result + ((getOrderSn() == null) ? 0 : getOrderSn().hashCode());
        result = prime * result + ((getName() == null) ? 0 : getName().hashCode());
        result = prime * result + ((getSex() == null) ? 0 : getSex().hashCode());
        result = prime * result + ((getBirthday() == null) ? 0 : getBirthday().hashCode());
        result = prime * result + ((getAge() == null) ? 0 : getAge().hashCode());
        result = prime * result + ((getHeight() == null) ? 0 : getHeight().hashCode());
        result = prime * result + ((getWeight() == null) ? 0 : getWeight().hashCode());
        result = prime * result + ((getBmi() == null) ? 0 : getBmi().hashCode());
        result = prime * result + ((getT() == null) ? 0 : getT().hashCode());
        result = prime * result + ((getZ() == null) ? 0 : getZ().hashCode());
        result = prime * result + ((getBmd() == null) ? 0 : getBmd().hashCode());
        result = prime * result + ((getTime() == null) ? 0 : getTime().hashCode());
        result = prime * result + ((getDate() == null) ? 0 : getDate().hashCode());
        result = prime * result + ((getIdCard() == null) ? 0 : getIdCard().hashCode());
        result = prime * result + ((getBmdMax() == null) ? 0 : getBmdMax().hashCode());
        result = prime * result + ((getBmdAge() == null) ? 0 : getBmdAge().hashCode());
        result = prime * result + ((getDcmDiagnosis() == null) ? 0 : getDcmDiagnosis().hashCode());
        result = prime * result + ((getTel() == null) ? 0 : getTel().hashCode());
        result = prime * result + ((getPosition() == null) ? 0 : getPosition().hashCode());
        result = prime * result + ((getSide() == null) ? 0 : getSide().hashCode());
        result = prime * result + ((getReferralDepartment() == null) ? 0 : getReferralDepartment().hashCode());
        result = prime * result + ((getClinicalDiagnosis() == null) ? 0 : getClinicalDiagnosis().hashCode());
        result = prime * result + ((getSubmittingDoctor() == null) ? 0 : getSubmittingDoctor().hashCode());
        result = prime * result + ((getInspectDoctor() == null) ? 0 : getInspectDoctor().hashCode());
        result = prime * result + ((getReviewDoctor() == null) ? 0 : getReviewDoctor().hashCode());
        result = prime * result + ((getReportDate() == null) ? 0 : getReportDate().hashCode());
        result = prime * result + ((getHospital() == null) ? 0 : getHospital().hashCode());
        result = prime * result + ((getHospitalAddr() == null) ? 0 : getHospitalAddr().hashCode());
        result = prime * result + ((getUserAddr() == null) ? 0 : getUserAddr().hashCode());
        result = prime * result + ((getSuggest() == null) ? 0 : getSuggest().hashCode());
        result = prime * result + ((getImageFile() == null) ? 0 : getImageFile().hashCode());
        result = prime * result + ((getUserId() == null) ? 0 : getUserId().hashCode());
        result = prime * result + ((getRace() == null) ? 0 : getRace().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", id=").append(id);
        sb.append(", orderSn=").append(orderSn);
        sb.append(", name=").append(name);
        sb.append(", sex=").append(sex);
        sb.append(", birthday=").append(birthday);
        sb.append(", age=").append(age);
        sb.append(", height=").append(height);
        sb.append(", weight=").append(weight);
        sb.append(", bmi=").append(bmi);
        sb.append(", t=").append(t);
        sb.append(", z=").append(z);
        sb.append(", bmd=").append(bmd);
        sb.append(", time=").append(time);
        sb.append(", date=").append(date);
        sb.append(", idCard=").append(idCard);
        sb.append(", bmdMax=").append(bmdMax);
        sb.append(", bmdAge=").append(bmdAge);
        sb.append(", dcmDiagnosis=").append(dcmDiagnosis);
        sb.append(", tel=").append(tel);
        sb.append(", position=").append(position);
        sb.append(", side=").append(side);
        sb.append(", referralDepartment=").append(referralDepartment);
        sb.append(", clinicalDiagnosis=").append(clinicalDiagnosis);
        sb.append(", submittingDoctor=").append(submittingDoctor);
        sb.append(", inspectDoctor=").append(inspectDoctor);
        sb.append(", reviewDoctor=").append(reviewDoctor);
        sb.append(", reportDate=").append(reportDate);
        sb.append(", hospital=").append(hospital);
        sb.append(", hospitalAddr=").append(hospitalAddr);
        sb.append(", userAddr=").append(userAddr);
        sb.append(", suggest=").append(suggest);
        sb.append(", imageFile=").append(imageFile);
        sb.append(", userId=").append(userId);
        sb.append(", race=").append(race);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}